<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    console.log(1);
    const p = new Promise((resolve, reject)=>{
        console.log(2);
        resolve("success");
        reject("error");
    });

    p.then((res)=>{
        console.log("这是resolve的执行功能", res);
        return new Promise((resolve,reject)=>{});
    }, (res)=>{
        console.log("这是reject的执行功能", res)
    })

    p.catch((res)=>{
        console.log("这还是reject的执行功能", res)
    })

    console.log(p);
    console.log(3);

    // =======

    const p1 = new Promise(()=>{})
    const p2 = new Promise(()=>{})
    const p3 = new Promise(()=>{})

    Promise.all([p1,p2,p3]).then()
    Promise.any([p1,p2,p3]).then()
    Promise.race([p1,p2,p3]).then()

</script>
</html>